import { createStore } from 'vuex'

export default createStore({
  state: {
    count:1
  },
  mutations: {
    changeCount(state,num){
      state.count+=num
    }
  },
  actions: {
    countAction(context,num){
      context.commit("changeCount",num)
    }
  },
  getters:{
    doubleCount:state=>state.count*2
  },
  modules: {
  }
})
